package main

import (
	"fmt"
	"unicode/utf8"
)

func main() {
	var r rune = '中'
	fmt.Printf("%c\n", r)
	buf := make([]byte, 4)
	n := utf8.EncodeRune(buf, r)
	fmt.Printf("%s\n", buf)

	for i := 0; i < n; i++ {
		fmt.Printf("%d:%c\n", i, buf[i])
	}
	fmt.Println()
}
